import request from '../utils/request.js'

// 会员列表数据接口
const getMemberList = (obj,obj1) => {
  return request({url:`/member/list/search/${obj.pageNum}/${obj.pageSize}`, method: 'POST', data:obj1})
}
// 删除会员接口
const removeMember = (id) => {
  return request({
    url: `/member/${id}`,
    method: 'DELETE',
  })
}
// 新增会员接口
const addMember = (data = {}) => {
  return request({
    url: '/member/',
    method: 'POST',
    data
  })
}
//查询单条会员接口
 const findMember = (id) =>{
  return request({
    url : `/member/${id}`,
    method : "GET"
  })
}
// 编辑会员接口
const editMember = (id, data = {}) => {
  return request({
    url: `/member/${id}`,
    method: 'PUT',
    data
  })
}
// 导出会员模块增删改查等接口
export default {
  getMemberList,
  removeMember,
  findMember,
  addMember,
  editMember
}